﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;


using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class admin_MasterPage : System.Web.UI.MasterPage
{
    private string titleName = "Interdist";
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (Session["title"] != null)
        //    title.Text = Session["title"].ToString();
        //else
        //    title.Text = titleName;
        if (Session["admin"] == null)
        {
            FormsAuthentication.RedirectToLoginPage();
        }
        LoadGioiThieu();
        LoadToChuc();
        LoadDoiTac();
        LoadTuyenDung();
        LoadTinTuc();
    }

    private void LoadGioiThieu()
    {
        repGioiThieu.DataSource = LoaiDataHelper.LoadLoaiGioiThieu(1);
        repGioiThieu.DataBind();
    }

    private void LoadToChuc()
    {
        repToChuc.DataSource = LoaiDataHelper.LoadLoaiToChuc();
        repToChuc.DataBind();
    }

    private void LoadDoiTac()
    {
        repDoiTac.DataSource = LoaiDataHelper.LoadLoaiDoiTac(1);
        repDoiTac.DataBind();
    }

    private void LoadTuyenDung()
    {
        repTuyenDung.DataSource = LoaiDataHelper.LoadLoaiTuyenDung();
        repTuyenDung.DataBind();
    }

    private void LoadTinTuc()
    {
        repTinTuc.DataSource = LoaiDataHelper.LoadLoaiTinTuc(1);
        repTinTuc.DataBind();
    }
}
